package com.zhsq.zlc.service.role;

import java.util.List;

import com.zhsq.zlc.dao.role.RoleMapper;
import com.zhsq.zlc.entity.RoleEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class RoleServiceImpl implements RoleService {

	@Autowired
	private RoleMapper roleMapper;

	@Override
	public List<RoleEntity> list(RoleEntity entity) throws Exception {
		return roleMapper.list(entity);
	}

	@Override
	public RoleEntity getRoleById(RoleEntity entity) throws Exception {
		return roleMapper.getRoleById(entity).get(0);
	}

	@Override
	public int count(RoleEntity entity) throws Exception {
		return roleMapper.count(entity);
	}

	@Override
	public void add(RoleEntity entity) throws Exception {
		roleMapper.add(entity);
	}

	@Override
	public void edit(RoleEntity entity) throws Exception {
		roleMapper.edit(entity);		
	}

	@Override
	public void delete(int id) throws Exception {
		roleMapper.delete(id);		
	}

	

}
